package cn.com.dcsgo.design.pattern.builder.car;

/**
 * 汽车生产主管，指挥汽车生产
 *
 * @author Dcsgo
 * @since 21/7/2025 上午 10:09
 */

public class Director {
    /**
     * 构造跑车
     *
     * @param carBuilder 汽车生成器
     */
    public void constructSportsCar(CarBuilder carBuilder) {
        carBuilder.reset();
        carBuilder.setSeats(2);
        carBuilder.setEngine(new Engine("跑车引擎"));
        carBuilder.setTripComputer("跑车行车计算机");
        carBuilder.setGps("跑车全球定位系统");
    }

    /**
     * 构造SUV
     *
     * @param carBuilder 汽车生成器
     */
    public void constructSuvCar(CarBuilder carBuilder) {
        carBuilder.reset();
        carBuilder.setSeats(6);
        carBuilder.setEngine(new Engine("SUV引擎"));
        carBuilder.setTripComputer("SUV行车计算机");
        carBuilder.setGps("北斗导航");
    }

    /**
     * 构造跑车说明书
     * @param carManualBuilder 汽车说明书生成器
     */
    public void constructSportsCarManual(CarManualBuilder carManualBuilder) {
        carManualBuilder.reset();
        carManualBuilder.setSeats(2);
        carManualBuilder.setEngine(new Engine("跑车引擎"));
        carManualBuilder.setTripComputer("跑车行车计算机");
        carManualBuilder.setGps("跑车全球定位系统");
    }
}
